# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=py3-pymsteams
pkgver=0.2.2
pkgrel=2
pkgdesc="Format messages and post to Microsoft Teams."
url="https://github.com/rveachkc/pymsteams"
arch="noarch"
license="Apache-2.0"
makedepends="py3-setuptools"
checkdepends="py3-pytest py3-requests py3-py py3-pluggy"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/rveachkc/pymsteams/archive/refs/tags/$pkgver.tar.gz"
builddir="$srcdir"/${pkgname/py3-/}-$pkgver
# httpstat.us is down
options="!check"

build() {
	python3 setup.py build
}

check() {
	export MS_TEAMS_WEBHOOK="https://localhost"
	python3 -m pytest -v -k "not test_message_size"
}

package() {
	python3 setup.py install --skip-build --root="$pkgdir"
}

sha512sums="
a15ae179f81214c27a279e728b7e716261017b9d27417efcb7d83fe64f21e56aca03b34ba31b1ebcaac2a1dac623065706ac69c679c28472f90ed7dae05b1b98  py3-pymsteams-0.2.2.tar.gz
"
